<template>
  <div>
    <el-dialog
      title="新增部门"
      :visible="centerDialogVisible"
      center
      @close="editVisible"
    >
      <el-form :model="form" label-width="120px">
        <el-form-item label="部门名称">
          <el-input v-model="form.name" style="width:80%" placeholder="1-50个字符" />
        </el-form-item>
        <el-form-item label="部门编码">
          <el-input v-model="form.code" style="width:80%" placeholder="1-50个字符" />
        </el-form-item>
        <el-form-item label="部门负责人">
          <el-select v-model="form.manger" style="width:80%" placeholder="请选择" />
        </el-form-item>
        <el-form-item label="部门介绍">
          <el-input v-model="form.intrduce" style="width:80%" placeholder="1-300个字符" type="textarea" />
        </el-form-item>
      </el-form>
      <template #footer class="dialog-footer">
        <el-button @click="editVisible">取 消</el-button>
        <el-button type="primary" @click="editVisible">确 定</el-button>
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    centerDialogVisible: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      form: {}
    }
  },
  methods: {
    editVisible() {
      this.$emit('editvisible')
    }
  }
}
</script>

<style>

</style>
